<template>
  <nav>
    <router-link to="/">首页</router-link> |
    <router-link to="/GlobalProperties">方式一</router-link> |
    <router-link to="/ProvideInject">方式二</router-link> |
    <router-link to="/LoopOutput">循环输出</router-link> |
    <router-link to="/DynamicUpdate">动态更新</router-link>
  </nav>
  <router-view />
</template>
<script setup>
import { provide } from 'vue'
import { echarts } from '@/utils/echarts' // 按需引入echarts
provide('echarts', echarts) // 提供全局使用
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>